package com.dmxtechnologies.community.war;

import java.util.logging.Logger;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

import com.dmxtechnologies.community.ejb.interfaces.JWHDetailTimeBroadcastRemote;
import com.dmxtechnologies.community.pojo.CMSDetailResponse;

@Named("cmsJWHDetailAccessBean")
@RequestScoped
public class CMSJWHDetailAccessBean {
	private static final Logger log = Logger.getLogger("CMSJWHDetailAccessBean");
	
	private CMSDetailResponse detailResponse;
	
	public CMSDetailResponse getDetailResponse() {
		return detailResponse;
	}

	public void setDetailResponse(CMSDetailResponse detailResponse) {
		this.detailResponse = detailResponse;
	}
	
	@EJB
	JWHDetailTimeBroadcastRemote jwhDetailTimeBroadcastRemote;

	@PostConstruct
	public void init() {
		log.info("begin");
//		this.setCookie();
		try {
			detailResponse = jwhDetailTimeBroadcastRemote.getJWHDetailContent();
		} catch (Exception ex) {
			throw new RuntimeException(ex);
		}
		log.info("end");
	}

}
